#pragma once
#include <string>
#include <vector>

#include <QObject>
#include <qstring.h>
#include <qvector.h>
#include <qdatetime.h>
#include <QtSql/qsqldatabase.h>
#include <QtSql/qsqlquery.h>
#include <QtSql/qsqlerror.h>
#include <qmetatype.h>

class Database_Operator
{
public:
	Database_Operator();
	Database_Operator(int, int*);
	~Database_Operator();
	bool isOpen();
	bool insert_record(std::string table_name, std::string type, std::vector<float>values);
	bool select_record(std::string table_name, std::string type, int num, float* values);
	std::vector<std::string>table_names;
private:
	QSqlDatabase DB;
	std::string database_name = "point_database.db";
	
	std::vector<int>points;
};